#include <stdint.h>
#define STX 0x02
#define ETX 0x03

#define SET_LEN 1
#define POIN_LEN 2
#define SN_LEN 1
#define CMD_LEN 2
#define DATA_LEN 2
#define CRC_LEN 2
#define ARK_LEN 2
#define ETX_LEN 1
#define PANDS_LEN POIN_LEN+SN_LEN
#define PSC_LEN PANDS_LEN+CMD_LEN
#define CANDD_LEN (CMD_LEN + DATA_LEN)
#define RA_LEN (POIN_LEN+SN_LEN+CMD_LEN+DATA_LEN)



#define ARQ_CANCLE_RET                  -3
#define CONFIG_SERIAL_CONSOLE_NUM	1

extern uint8_t g_aux;
typedef struct{
	uint8_t stx;
	uint8_t point[2];
	uint8_t sn;
	uint8_t cmd[2];
	uint8_t datalen[2];
	uint8_t ack_cod[2];
	uint8_t data[1024];
	uint8_t crc[2];
	uint8_t etx;
}rdp_t;


//#define debug
#ifdef debug
#define dbg printf
#else 
#define dbg 

#endif

int get_1(int timeout);
int put_1(int ch);



